import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {Helper} from "../../common/Helper";
import {PayPasswordPage} from "../pay-password/pay-password";
import {LoginPasswordPage} from "../login-password/login-password";

@IonicPage()
@Component({
  selector: 'page-setting',
  templateUrl: 'setting.html',
})
export class SettingPage {

  payPasswordPage:any
  loginPasswordPage:any

  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public helper: Helper) {
    this.payPasswordPage = PayPasswordPage
    this.loginPasswordPage = LoginPasswordPage
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad SettingPage');
  }

  ionViewWillEnter(){
    Helper.setStatusBarDefault()
  }

  loginOut(){
    this.helper.removeStorage('token/accessToken')
    this.helper.removeStorage('token/refreshToken')
    this.helper.removeStorage('token/type')
    this.helper.setStorage('user/login','0')
    this.navCtrl.pop()
  }

}
